<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
	<th:block th:include="include :: header('角色列表')" />
</head>
<body class="gray-bg">
	<div class="container-div">
		<div class="row">
		  <div class="col-sm-12 search-collapse">
				<form id="role-form">
					<div class="select-list">
						<ul>
							<li>
								活动名称：<input type="text" name="actName"/>
							</li>
							<li>
								购买用户：<input type="text" name="customerName"/>
							</li>
							<li>
								支付类型：<select name="payType" th:with="type=${@dict.getType('sys_normal_disable')}">
									<option th:value="0">所有</option>
									<option th:value="1">云闪付</option>
									<option th:value="2">微信</option>
									<option th:value="3">支付宝</option>
								</select>
							</li>
							<li class="select-time">
								<label>购买时间： </label>
								<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginTime]"/>
								<span>-</span>
								<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endTime]"/>
							</li>
							<li>
								<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
							    <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
							</li>
						</ul>
					</div>
				</form>
			</div>
			        
	        <div class="col-sm-12 select-table table-striped">
			    <table id="bootstrap-table"></table>
			</div>
		</div>
	</div>
	<th:block th:include="include :: footer" />
	<script th:inline="javascript">
		
		var prefix = ctx + "order";
		
		$(function() {
		    var options = {
		        url: prefix + "/listByWadamao",
		        sortName: "orderId",
		        modalName: "活动订单",
		        columns: [{
		            checkbox: true
		        },
		        {
		            field: 'actName',
		            title: '活动名称'
		        },
		        {
		            field: 'customerName',
		            title: '购买人',
		            sortable: true
		        },
		        {
		            field: 'mobile',
		            title: '手机号',
		            sortable: true
		        },
		        {
		            field: 'price',
		            title: '单价',
		            sortable: true
		        },
		        {
		            field: 'amount',
		            title: '金额',
		            sortable: true
		        },
		        {
		            field: 'number',
		            title: '数量',
		            sortable: true
		        },
		        {
		            field: 'createTime',
		            title: '购买时间',
		            sortable: true
		        },{
		            field: 'unit',
		            title: '单位',
		            sortable: true
		        },{
		            field: 'spec',
		            title: '规格',
		            sortable: true
		        },{
		            field: 'payType',
		            title: '支付类型',
		            formatter: function (value, row, index) {
		            	console.log(value+"a"+row.payType)
		        		if(value=="1"){
		        			return "云闪付";
		        		}else if(value=="2"){
		        			return "微信"
		        		}else{
		        			return "支付宝"
		        		}
		        	}
		        },
		        {
		            field: 'bankCardNo',
		            title: '银行卡号',
		            sortable: true
		        },
		        {
		            field: 'orStatus',
		            title: '收单状态',
		            sortable: true
		        },
		        {
		            field: 'billDesc',
		            title: '支付描述',
		            sortable: true
		        },
		        {
		            field: 'school',
		            title: '学校',
		            sortable: true
		        },{
		            field: 'grade',
		            title: '年级',
		            sortable: true
		        },{
		            field: 'className',
		            title: '班级',
		            sortable: true
		        },{
		            field: 'region',
		            title: '所属地区',
		            sortable: true
		        },{
		            field: 'address',
		            title: '地址',
		            sortable: true
		        },{
		            field: 'postCode',
		            title: '邮政编码',
		            sortable: true
		        }]
		    };
		    $.table.init(options);
		});
			

		
	</script>
</body>
</html>